<?$gn = Group::company();?>
<style>
  .form_err {color:red; font-size: 90%; font-style:italic}
</style>
    
<div style="margin:10px">

    
    <div class="div_form">
        <h1>User groups management</h1>
        <div>
            <a href="index.php?m=administration&a=view_group">Groups list</a> | Create new groups
        </div>
        
        <?if($error):?><div class="error">Something wrong! <?=$error?></div><?endif?>    
        <form class="form" action="index.php?m=administration&a=create_group&s=submit" method="POST" style="margin: 10px 30px;">
        
            <table>
                <tr>
                    <td>
                        Group name:
                    </td>
                    <td>
                        <input type="text" name="group_name" value="<?=$data['group_name']?>">
                    </td>
                </tr>
                <tr>
                    <td>
                        Group description:
                    </td>
                    <td>
                        <input type="text" name="group_description" value="<?=$data['group_description']?>">
                    </td>
                </tr>
                <tr>
                    <td>
                        Company:
                    </td>
                    <td>
                        <select name="idcustomers">
                            <option value="0">-Select-</option>
                            <?foreach($gn as $g):?>
                            
                            <option value="<?=$g['idcustomers']?>"  ><?=$g['namecustomer']?></option>
                            <?endforeach?>
                        </select> 
                    </td>
                </tr>
            </table>

        <input type="submit" value="Create Group"><br/>
        </form>
    </div>   
</div>

<style>

td
{
padding:7px;
}
</style>